from openpyxl import Workbook
wb=Workbook()
ws=wb.active
ws['A1']='编号'
ws.append([1,2,3])
import datetime
ws['A2']=datetime.datetime.now()
wb.save('sample.xlsx')

# from openpyxl import load_workbook
# #加载excel文件
# wb=load_workbook(filename='data/data1.xlsx')
# # 打印出workbook中所有的sheet
# #print(wb.workbook)
# #加载workbo
# ws=wb['topics']
# print(ws['D2'].value)